package com.tristen.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tristen.common.utils.PageUtils;
import com.tristen.gulimall.product.entity.CategoryEntity;
import com.tristen.gulimall.product.vo.Catelog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author gx
 * @email 2519294308@qq.com
 * @date 2021-09-05 21:07:00
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 获取商品树结构
     * @return
     */
    List<CategoryEntity> listWithTree();

    /**
     * 批量删除商品菜单
     * @param catIds
     */
    void removeMenuByIds(Long[] catIds);

    /**
     *
     * @param catelogId
     * @return
     */
    Long[] findCategoryPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Categorys();

    Map<String, List<Catelog2Vo>> getCatalogJsonFromDB();
}

